package de.tum.in.eist.im.client;

import java.util.LinkedList;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.cellview.client.CellList;
import com.google.gwt.cell.client.TextCell;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.user.client.ui.ListBox;

public class Design {

	public Design() {
		RootPanel rootPanel = RootPanel.get("content");
		rootPanel.setSize("1000", "800");
		TextBox messageBox;
		Button sendMessageButton;

		// UserList widgets (order of showing)
		SuggestBox suggestUserBox;
		LinkedList<String> userOnlineStringList;
		ScrollPanel scrollPanelUserOnline;
		CellList<String> userOnline;

		userOnlineStringList = new LinkedList<String>();

		messageBox = new TextBox();
		rootPanel.add(messageBox, 10, 462);
		messageBox.setSize("694px", "16px");

		sendMessageButton = new Button("send message");
		sendMessageButton.setText("Send");
		rootPanel.add(sendMessageButton, 720, 462);
		sendMessageButton.setSize("83px", "28px");

		suggestUserBox = new SuggestBox();
		rootPanel.add(suggestUserBox, 809, 44);
		suggestUserBox.setSize("171px", "18px");

		scrollPanelUserOnline = new ScrollPanel();
		rootPanel.add(scrollPanelUserOnline, 809, 80);
		scrollPanelUserOnline.setSize("181px", "412px");

		userOnline = new CellList<String>(new TextCell());
		scrollPanelUserOnline.setWidget(userOnline);
		userOnline.setSize("100%", "100%");
		userOnline.setRowData(userOnlineStringList);

		Button btnSettings = new Button("Settings");
		rootPanel.add(btnSettings, 10, 10);
		btnSettings.setSize("65px", "28px");

		Button btnLogin = new Button("Login");
		rootPanel.add(btnLogin, 925, 10);
		btnLogin.setSize("65px", "28px");
		
		ScrollPanel scrollPanel = new ScrollPanel();
		rootPanel.add(scrollPanel, 357, 44);
		scrollPanel.setSize("181px", "412px");
		
	
		
		ListBox comboBox = new ListBox();
		rootPanel.add(comboBox, 10, 44);
		comboBox.setSize("181px", "20px");
		
		ListBox comboBox_1 = new ListBox();
		rootPanel.add(comboBox_1, 197, 44);
		comboBox_1.setSize("181px", "30px");
		
		Button addPerson = new Button("+ person");
		rootPanel.add(addPerson, 720, 44);
		addPerson.setSize("83px", "30px");
		
		Button btnGroup = new Button("+ group");
		rootPanel.add(btnGroup, 10, 70);
		btnGroup.setSize("181px", "28px");
	}
}
